<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <style>
    div {
        width: 300px;
        height: 200px;
        border: 2px solid red;
    }
    </style>
    <title>innerHTML and innerTEXT</title>
</head>
<body>
    <input type="button" value="Set Value" id="btn">
    <br>
    <br>
    <div id="content"></div>

    <script>
        // Onclick set the content of the dvi.
        document.getElementById("btn").onclick = function(){
            // The right method is using textContent.
            // Chrome, FireFox support it, but IE8 not.
            // XP --> IE6
            document.getElementById("content").textContent = "Hi! You got me!";

            // innerText is a standard attribute of IE8
            
        }
    
    </script>
</body>
</html>